package com.fyt.ZhongYaoApp.Controller;

import com.fyt.ZhongYaoApp.pojo.Result;
import com.fyt.ZhongYaoApp.pojo.Discern;
import com.fyt.ZhongYaoApp.service.DiscernService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("discern")
public class discernController {

    @Autowired
    DiscernService discernService;

    /**
     * 上传url
     * @return
     */
    @PostMapping("/add")
    public Result add(@RequestBody Discern discern) {

        discernService.add(discern);
        return Result.success();
    }
}
